<?

function smarty_function_ajax_link( $params, $smarty ) {

	// make sure we have dependent plugins
	require_once $smarty->_get_plugin_filepath( 'modifier', 'escape' );

	// fetch the url for the request
	$url = Smutty_Utils::getUrl(
		Smutty_Utils::strToHash($params['url'])
	);
	$update = $params['update'];
	$handler = $params['handler'];
	$feedback = $params['feedback'];

	// create the link!
	echo '<a href="javascript:smutty_ajaxCall(' .
			'\'' . $url . '\',' .
			'\'' . $update . '\',' .
			'\'' . $handler . '\',' .
			'null,' .
			'\'' . $feedback . '\'' .
		');">' . smarty_modifier_escape($params['text']) . '</a>';

}

?>